<!DOCTYPE html>
<html lang="zn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>复习</title>
    <script>
        /*
            对于Number调用toString()时可以在方法中传递一个整数作为参数
            此时它将会把数字转换为指定的进制，如果不指定则默认转换为10进制数
            
        */
        var a = 255;
        a = a.toString(2);

        console.log(a);
        console.log(typeof a);
    </script>
</head>
<body>
    
</body>
</html>